// import request from '@/utils/request'
import request from '@/utils/request'
/**
 *
 * @param {*} data 请求体
 * @returns  返回值
 */
export function reqLogin(data) {
  return request({
    method: 'post',
    url: '/sys/login',
    data
  })
}

export const reqGetUserInfo = () => request.post('/sys/profile')
export const reqGetUserDetaIlById = (id) => request.get(`/sys/user/${id}`)

/** *
 * 保存员工的基本信息
 * **/
export function reqSaveUserDetailById(data) {
  return request({
    method: 'put',
    url: `/sys/user/${data.id}`,
    data
  })
}
